<link rel="stylesheet" type="text/css" href="/Kcdns/Public/Admin/plugins/cityPicker/cityPicker.css">
<div id="citypicker" style="position: relative;">loading...</div>
<script type="text/javascript" src="/Kcdns/Public/Admin/plugins/cityPicker/cityPicker.js"></script>
<script type="text/javascript">
    $(function () {
        // // 设置城市
        $.ajax( {
            url: "/location",
            type: "get",
            dataType: "json",
            success: function( data ){
                new CityPicker({
                    target: "#citypicker",
                    data: data,
                    defaultId:"{$field['value']}",
                    defaultName:"{$field.name}",
                    readOnly:"{:$readonly ? 'readyOnly' : ''}"
                })
            }
        } )
    });
</script>